package com.epam.DAO.Factories;

import com.epam.DAO.BillDAO;
import com.epam.DAO.CarDAO;
import com.epam.DAO.ClientDAO;
import com.epam.DAO.RequestDAO;
import com.epam.DAO.UserDAO;

public abstract class DAOFactory {

	public static final int JPA = 1;
	public static final int HIBERNATE = 2;

	public static final int CURRENT_IMPLEMENTATION = JPA;
	
	public abstract BillDAO getBillDAO();
	public abstract CarDAO getCarDAO();
	public abstract ClientDAO getClientDAO();
	public abstract RequestDAO getRequestDAO();
	public abstract UserDAO getUserDAO();
	
	public static DAOFactory getDAOFactory(int factory){
		switch (factory) { 
	      case JPA: return new JPADAOFactory(); 
	      case HIBERNATE : return new HibernateDAOFactory(); 
	      default : return null; 
	} 

	}
	
}
